﻿@model PersonBlog.Model.AgendaManageEntity

@using PersonBlog.Models;
@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
    Result r = ViewBag.Result == null ? new Result() : ViewBag.Result;
    
}

<script src="~/Scripts/My97DatePicker/WdatePicker.js"></script>
<script>
    $(document).ready(function () {
        var msg = $("#msg").val();
        if (msg != "") {
            layer.msg(msg);
        }
    })

    function ClearAll() {
        $("#ProjectName").val("");
        $("#UserName").val("");
        $("#UserPwd").val("");
    }
</script>
<input id="msg" type="hidden" value="@r.Message" />
<div class="graphs">
    <div class="xs">
        <h3>新增日程</h3>
        <div class="bs-example" data-example-id="form-validation-states">
            @using (Html.BeginForm("Create", "PwdManage", FormMethod.Post))
            {
                @Html.HiddenFor(Model => Model.ID);
                <div class="form-group has-warning">
                    <label class="control-label" for="inputWarning1">主题</label>
                    @Html.TextBoxFor(Model => Model.Topic, new { @class = "form-control1" })
                </div>
                <div class="form-group has-warning">
                    <label class="control-label" for="inputWarning1">开始时间</label>
                    @Html.TextBoxFor(Model => Model.StartTime, new { @class = "form-control1",onFocus = "WdatePicker({lang:'zh-cn',minDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd HH:mm:ss'})", placeholder = "日程开始时间" })
                   
                </div>
                <div class="form-group has-warning">
                    <label class="control-label" for="inputWarning1">结束时间</label>
                    <input class="form-control1" onFocus = "WdatePicker({lang:'zh-cn',minDate:'#F{$dp.$D(\'StartTime\')}',dateFmt:'yyyy-MM-dd HH:mm:ss'})" placeholder="日程结束时间" value="@Model.EndTime" />
                </div>
                <div class="form-group has-warning">
                    <label class="control-label" for="inputWarning1">描述</label>
                    <textarea class="form-control1" placeholder="日程描述">@Model.InfoDesc</textarea>
                </div>
               
                    <div class="panel-footer">
                        <div class="row">
                            <div class="col-sm-8 col-sm-offset-2">
                                <button class="btn-success btn" type="submit">保存</button>
                                <a class="btn-default btn" href="@Url.Action("Index")">取消</a>
                                <a class="btn-default btn" onclick="ClearAll();">重置</a>
                                @*<button class="btn-default btn" onclick="window.loaction.href='@Url.Action("Index", "PwdManage")';return false;">取消</button>*@
                                @*<button class="btn-inverse btn" onclick="ClearAll(); return false;">重置</button>*@
                            </div>
                        </div>
                    </div>
            }
        </div>
    </div>
</div>


